package com.zhihu.controller;

import com.zhihu.po.DeepSeek;
import com.zhihu.service.DeepSeekService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author BangLin
 * @Date 2025/4/26 18:41
 */
@RestController
@RequestMapping("/deepSeek/")
@RequiredArgsConstructor
@Slf4j
public class DeepSeekController {


    private final DeepSeekService deepSeekService;


    @GetMapping(value = "generate", produces = "application/json;charset=UTF-8")
    public ResponseEntity<String> generate(DeepSeek deepSeek) {
        String result = deepSeekService.generateText(deepSeek.getContent());
        return ResponseEntity.ok(result);
    }
}
